package com.ccc.oa.common.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * --- 代码敲对！ ---
 *
 * @author CCCccc
 * @create 2025/10/10
 * 备注：用户实体类
 */
// 该注解表示该类为数据库表映射
@TableName("oa_user")
@Data
public class OaUser {
    /*用户id*/
    // 该注解表示该字段为数据库表主键，且自增
    @TableId(type = IdType.AUTO)
    private Integer id;

    /*用户名*/
    private String username;

    /*密码*/
    private String password;

    /*昵称*/
    private String nickname;

    /*手机号*/
    private String phone;

    /*头像*/
    private String avatar;

    /*性别*/
    private String gender;

    /*部门*/
    private String sector;

    /*生日*/
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date birth;

    /*注册时间*/
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onboardTime;

    /*最近登录时间*/
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date loginTime;

    /*创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;

    /*更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date updateTime;
}
